1. Field of the Invention
The present invention relates to a system for dynamic power management and in particular to a system for dynamic power management for distributed architecture system on chip.
2. Description of the Related Art
There has been a significant increase in the number of battery driven handheld devices. The battery technology has not advanced as fast as the technology of the power dependent hardware that runs these devices. Thus the batteries of portable and mobile devices tend to discharge relatively quickly thereby making power management a key consideration in the design of such devices.
For effective power management, the processors used in these devices support many operational modes (low power modes) that have different performance and power consumption characteristics. The processor is put into a low power state when no applications are active and when no tasks or interrupt routines need to be serviced. One of the most commonly used low power states is referred to as the “idle” state. When the processor is in idle state it stops executing instructions. The processor may be reactivated or brought out of idle upon the occurrence of some event, such as the expiration of a hardware timer, or the detection of a keyboard press or other hardware interface interrupt. The event or interrupt causes the processor to transition out of the low power state and service the interrupt. By putting the processor into the idle state (where the clock to the core is turned off), battery life may be extended, particularly in systems in which the power consumed by the processor is significant compared to that of other components such as display and memory components, thus controlling the battery consumption in handheld devices/PDAs.
The power management becomes more complex in modern system on chips (SOCs), like Nomadik (Nomadik is a multimedia application processor from STMicroelectronics), that consists of several loosely coupled multi-processors. In these system-on-chips, system designers assign tasks to the different processors and implement them independently, possibly with different operating systems in each processor. There is some communications among processors to exchange information and coordinate tasks. For the sake of simplicity in the hardware, these multiple cores may share the same frequency and voltage sources. As such the entry in any of the low power mode should be agreed upon by all the processors as well as the peripherals.
These SOCs provide many low power modes like SLOW, SLEEP and DEEPSLEEP. While in “SLOW” mode everything runs at low frequency, in case of “SLEEP” the clocks of the system are removed, and in case of “DEEPSLEEP”, the clocks along with the power of the system are removed as well. Although these modes have very low power consumption characteristics, they cannot be entered all the time since the system is rendered inoperable in these modes. Besides this, there are latency cost in terms of time and energy that one should confront with while entering and exiting these modes. But in a system that spends most of its time idling, it may be desirable to take advantage of low power state, reduce power consumption, and thereby extend the life of the battery.
Conventional operating systems however take advantage of these low power states in only two conditions:
a. When the user powers off the device.
b. Whenever the high-level power management function determines that the device should be turned off, for example, due to user inactivity.
Existing computing devices such as Compaq Computer Corporation's Itsy Pocket Computer and the PALM PILOT, by way of example, implement SLEEP state in the above mentioned ways only.
Conventional operating systems offer an idle function that is called whenever the core is idle i.e. there is no thread ready to run. This is the only guaranteed place where the core will definitely be idle. Out here the low power modes like SLEEP or DEEP SLEEP can be utilized. But the question remains on the feasibility of entering these low power modes.
United States Patent Application 20030196127 discloses a system, wherein low power modes like SLEEP and DEEP SLEEP might be entered if the time to be spent in the idle function is substantial. Normally, the operating system provides information on how long there is no thread schedulable in the system. So, one can get an idea about the maximum possible duration of this idle period. Also, one might wait for a specified amount of time and if the core is still idle, SLEEP or DEEP SLEEP might be entered assuming that the actual idle period duration would be long enough. However, there are some shortcomings of above approach. First, the exact duration for which the core would remain idle is difficult to predict. There is a possibility that an external interrupt may make the core active again. Secondly, the approach stated above safely assumes that the level of activity on the central core is an indicator of the level of activity in the rest of the system. If the central processor becomes idle for a long time, the approach stated above assumes the entire system to be inactive and enters SLEEP mode. This is fine for systems with only core as the primary or may be the only component but is not a suitable assumption for modern complex systems (with distributed architecture like Nomadik) where there are multiple processors. In such cases the entry into any of these low power modes by just observing the core to be idle can prove disruptive. The solution proposed in US 20030196127 does not talk about the feasibility of low power mode transitions for such distributed architectures.
One of the most obvious ways of ensuring inactivity in such distributed architecture systems could be to query each and every component about their willingness. However, this approach has several shortcomings. First, this approach consumes a lot of time just to know whether a low power mode can be entered or not. Second, the time when the drivers are queried, energy is wasted since the core is being kept busy in the query process.
FIG. 1 shows the timing diagram of a this kind of power management system that depicts the transition between the idle state and the running state, wherein the core is running and actively consuming power when it is supposed to be idle. The portion of idle time that can be effectively used for aggressive power management is being wasted just for testing feasibility of a low power transition. Hence, this approach is costly in terms of both time and power.
Thus, there is a need for effective power management for systems with distributed architectures. In particular, there is a need for a power management system that takes into consideration the operating state of each processor/peripheral for deciding the transition to a low power mode.